home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
comm
/
fido
/
GMS_1_1_85.lha
/
GMS
/
Rexx
/
GMS_general.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-04-19
|
1KB
|
67 lines
/*
* $VER: GMS_General.rexx 1.1 (12.4.95)
*
*/
options results
signal on error
signal on syntax
parse arg gms_command gms_line gms_arguments
if( ~show( 'l', "gms_mailer_rexx.library" ) ) then
do
if( ~addlib( "gms_mailer_rexx.library", 0, -30, 0 ) )then
do
say "Could not open gms_mailer_rexx.library"
exit 10
end
end
if gms_command == '' then signal Usage
if gms_line == '' then gms_line = 0
i = gms_arguments; gms_arguments = "'gms_mailer'"
do while length( i ) ~= 0
parse var i j ',' i
j = strip( j, 'B' )
if gms_arguments ~= '' then gms_arguments = gms_arguments' , "'j'"'
else gms_arguments = '"'j'"'
end
call GMS_Mailer_System_Alloc('gms_mailer', gms_line, 'nonew')
say "ret =" gms_command || "(" gms_arguments ")"
interpret "ret =" gms_command || "(" gms_arguments ")"
say 'Result =' ret
call GMS_Mailer_System_Free('gms_mailer')
call GMS_Mailer_FreeScriptData()
exit 0
Usage:
say 'Usage: rx GMS_General[.rexx] <cmd name> <line num> <cmd args>'
call GMS_Mailer_FreeScriptData()
exit 0
error:
syntax:
error_text = GMS_Mailer_LastError()
if error_text = '' then error_text = rc ErrorText( rc )
say '| ***BREAK: error at' sigl error_text
call GMS_Mailer_FreeScriptData()
exit rc